﻿
<h3>Fiche de frais du <?php echo $leMois; ?> : 
</h3>
<div class="encadre">
    <p>
        Etat : <?php echo $libEtat ?> depuis le <?php echo $dateModif ?> <br> Montant validé : <?php echo $montantValide ?>


    </p>
    
    <form action="index.php?uc=validFrais&action=validerMajFraisForfait" method="post">
        <table class="listeLegere" border="1">
            <caption>Eléments forfaitisés </caption>
            <tr>
                <?php
                foreach ($lesFraisForfait as $unFraisForfait) {
                    $libelle = $unFraisForfait['libelle'];
                    ?>	
                    <th> <label for="idFrais"><?php echo $libelle ?></label></th>
                    <?php
                }
                ?>
            </tr>
            <tr>
                <?php
                foreach ($lesFraisForfait as $unFraisForfait) {
                    $idFrais = $unFraisForfait['idfrais'];
                    $libelle = $unFraisForfait['libelle'];
                    $quantite = $unFraisForfait['quantite'];
                    ?>
                    
                    <td class="qteForfait"><input type="text" id="idFrais" name="lesFrais[<?php echo $idFrais ?>]" size="10" maxlength="5" value="<?php echo $quantite ?>" ></td>
                    <?php
                }
                ?>
            </tr>
        </table>

        <div align="right">

            <input id="ok" type="submit" value="Valider" size="20" />
            <input id="annuler" type="reset" value="Effacer" size="20" />

        </div>
    </form>
    
    <form action="index.php?uc=validFrais&action=validerLaFiche" method="post">
    <table class="listeLegere">
        <caption>Descriptif des éléments hors forfait -<input type="text" size="5" value="<?php echo $nbJustificatifs ?>"> justificatifs reçus -
        </caption>
        <tr>
            <th class="date">Date</th>
            <th class="libelle">Libellé</th>
            <th class='montant'>Montant</th>
            <th colspan="2" class="action">Action</th>
        </tr>
        <?php
        foreach ($lesFraisHorsForfait as $unFraisHorsForfait) {
            $date = $unFraisHorsForfait['date'];
            $libelle = $unFraisHorsForfait['libelle'];
            $montant = $unFraisHorsForfait['montant'];
            ?>
            <tr>
                <td><?php echo $date ?></td>
                <td><?php echo $libelle ?></td>
                <td><?php echo $montant ?></td>
                <td><a href="http://localhost/GSB_AppliMVC/gsbMVC/index.php?uc=validFrais&action=Supprimer">Supprimer</a></td>
                <td><a href="http://localhost/GSB_AppliMVC/gsbMVC/index.php?uc=validFrais&action=Reporter">Reporter</a></td>
            </tr>

            <?php
        }
        ?>
    </table>
    <div align="right">
        <p>
            <input id="ok" type="submit" value="Valider la fiche" size="20" />
        </p>
    </div>
        </form>
</div>
</div>